perm filename EXAMPL.IJ[TLK,DBL] blob sn#174633 filedate 1975-08-27 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00003 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	.DEVICE XGP
C00008 00003	↓_A Few Small Beings_↓
C00018 ENDMK
C⊗;
.DEVICE XGP

.FONT 1 "BASL30"
.FONT 2 "BASB30"
.FONT 4  "BASI30"
.FONT 5  "BDR40"
.FONT 6  "NGR25"
.FONT 7  "NGR20"
.FONT B "SUB"
.TURN ON "↑α↓_π[]{"
.TURN ON "⊗" FOR "%"
.PAGE FRAME 54 HIGH 89 WIDE
.AREA TEXT LINES 1 TO 53
.COUNT PAGE PRINTING "1"
.TABBREAK
.ODDLEFTBORDER←EVENLEFTBORDER←850
.AT "ffi" ⊂ IF THISFONT ≤ 4 THEN "≠"  ELSE "fαfαi" ⊃;
.AT "ffl" ⊂ IF THISFONT ≤ 4 THEN "α∞" ELSE "fαfαl" ⊃;
.AT "ff"  ⊂ IF THISFONT ≤ 4 THEN "≥"  ELSE "fαf" ⊃;
.AT "fi"  ⊂ IF THISFONT ≤ 4 THEN "α≡" ELSE "fαi" ⊃;
.AT "fl"  ⊂ IF THISFONT ≤ 4 THEN "∨"  ELSE "fαl" ⊃;
.SELECT 1
.PAGE←0
.NARROW 2,7
.TURN OFF "{∞→}"   
.NEXT PAGE
.NOFILL
.PREFACE 0
.INDENT 10
.ONCE CENTER SELECT 5
↓_A Few Small Beings_↓

.TURN ON "\" TABS 31,39



⊗2↓_1. ALTERNATIVES_↓⊗*
  Recognize: If n disjoint situations are to get different responses
  Arguments: n; how to test for each situation; what to respond to each
  Code:      (COND\(⊗4test⊗B1\⊗4response⊗B1⊗1)
\(⊗4test⊗B2\⊗4response⊗B2⊗1)
\(⊗4test⊗B3\⊗4response⊗B3⊗1)
\     .
\     .
\     .
\(⊗4test⊗Bn\⊗4response⊗Bn⊗1)
\(T\⊗4default response⊗1)
  Comments: If all responses begin by doing x, then factor x out of the COND


⊗2↓_2. CONTRADICTION_↓⊗*
  Recognize: x is incompatible with y;  the set x is inconsistent;  paradox ⊗6X → ¬X⊗*
  Arguments: What is incompatible; with what (or "self"); why (if known)
  Code: Examine item x for absolute features; pick one; negate it.
	If no features are absolutely definite, then we can be certain of a
	contradiction if the item and its negation are both asserted; else NIL.
  Complexity: I may recurse, but my generated code is usually efficient


⊗2↓_3. PROBABILITY_↓⊗*
  Recognize: Probability=1, Probability=0, Probability⊗6>0&<1⊗*
	Precisely 1 of these 3 cases will describe any given thing.


⊗2↓_4. NEGATION_↓⊗*
  Recognize: Not, no, never, none, opposite, inverse
  Arguments: x
  Code: If x is executable, (NOT x) is the executable negation.
	If x is one of a set of cases which cover all alternatives, then
	     disjoin the negations of all the other cases.
  Comments: If the final form matches (NOT (NOT z)), replace it simply by z.
  Complexity: The cost is negligibly more than the unnegated version.


⊗2↓_5. MEMBERSHIP_↓⊗*
  Recognize: e is a member of X, e's presence in X, e is one of X
  Arguments: Potential member e; master set X; whether e must be EQ to some member of X
  Code: (MEMBER e X)
  Comments: This is executable. X must be a separate structure.
	If e is atomic or known to be EQ to a member of X, use MEMB instead of MEMBER
  Complexity: negligible in general; actually proportional to the length of the list
.SKIP TO COLUMN 1
⊗2↓_6. BRANCHING-TEST_↓⊗*
  Recognize: Tests executed within a COND, to see which branch of the COND to take.
  Arguments: Description of what is wanted; list of all preceding tests in the COND
  Code:  Negate each preceding test, and assume all these negations are true.
	Use these to remove some the parts of the description of what is wanted.
	Encode the rest of the description.
  Comments: If an item must be caught by ⊗4some⊗* of the branching tests up to and
	including this one, then eliminate all the succeeding branches of the COND,
	and write the current branching test simply as the constant test T.
  Complexity: The easiest type of test is a constant T or NIL, or a numerical comparison.
	Next easiest is a simple Membership test. If the alternatives are nested
	sets, order them in the COND. Still easier if they are disjoint sets.


⊗2↓_7. STRUCTURE-INDUCER_↓⊗*
  Recognize: Easy way to do something, if only x were structured in manner S.
  Arguments: Entity x, desired structure S to be imposed
  Arg-check: Either x is unstructured, or else check carefully that its
	current constraints can never contradict those implied by description S.
  Requisites: At the beginning, if unsure, ask the user for his permission. 
	At the end, if x has been newly constrained, go back and look over all
	previous references to x, and alter them to fit S as necessary.
	At the end, inform the user of what has been done to x and its references.
  Code: If x is now a set, and S is a request for maintenance of x as a set of
	disjoint sets, then get a name for each new subset, and...
	If x is...


⊗2↓_8. LONG-NAME-AVOIDER_↓⊗*
  Recognize: any identifier over 20 characters long
  Arguments: identifier x
  Requisites: Get new, short, plausible names for x.
	Complain to the user, have him pick a new name for x.
	At the end, tell the user how many occurrences were replaced.
  Code: Replace all previous occurences of x by the new short name.


⊗2↓_9. PLAUSIBLE-NAMER_↓⊗*
  Recognize: need to get a name for x
  Arguments: description x of what the thing is all about
  Requisites: Get initials of each word in x; pick out the main words in x
  Code: Compose some of the initials and main words and first few words of x
  Demons: Wake up anyone who looks at the names of identifiers.


⊗2↓_10. MESSENGER_↓⊗*
  Recognize: make user aware of x, inform user of x, tell user x, ask user x, decide x
  Arguments: message x
  Requisites: record the time and content of this message
  Code: print x on user/system i/o device (default: (PRINT x)).
  Comments: if the user has recently seen this message, abbreviate or eliminate it.
	Compare to recent messages. Use pronouns where meaningful.
  Complexity: the user is a very costly and errorful channel, so avoid if possible.